<?php

class JjzkController extends Controller {
    public function index(){
    	$this->assign('title',"竞价智库编辑页");
        $m=M('Bzgl');
        $list = $m->field(true)->order('pid,sort')->select();
        $this->assign('list', $list); 
		$this->display();
    }
    public function ctadd(){
        $m=M('Jjzk');
        $date=date('Y-m-d H:i:s');
        $jjzk['addtime']=$date;
        $jjzk['bzname']=$_POST['bzname'];
        $jjzk['label']=$_POST['label'];
        $jjzk['name']=$_POST['name'];
        $jjzk['keyname']=$_POST['keyname'];
        $jjzk['cytitle']=$_POST['cytitle'];
        $jjzk['cyms1']=$_POST['cyms1'];
        $jjzk['cyms2']=$_POST['cyms2'];
        $jjzk['pchttp1']=$_POST['pchttp1'];
        $jjzk['pchttp2']=$_POST['pchttp2'];
        $jjzk['pchttp3']=$_POST['pchttp3'];
        $jjzk['sjhttp1']=$_POST['sjhttp1'];
        $jjzk['sjhttp2']=$_POST['sjhttp2'];
        $jjzk['sjhttp3']=$_POST['sjhttp3'];
        $m->data($jjzk)->add();

    }
}